#include "server_info.h"

int show_log(GList *list, char *str){
	GtkWidget *text_view;
	GList *tmplist;
	tmplist = list;
	while(tmplist != NULL){
		if(GTK_IS_TEXT_VIEW(tmplist->data)){
			GtkWidget *text_view;
			GtkTextBuffer *buf;
			GtkTextIter iter;
			text_view = GTK_TEXT_VIEW(tmplist->data);
			buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_view));
			gtk_text_buffer_get_end_iter(buf, &iter);
			gtk_text_buffer_insert(buf, &iter, str, -1);
			printf("insert log\n");
			break;
		}else
			printf("it's not\n");
		tmplist = tmplist->next;
	}
	printf("deal with log\n");
	return 1;
}
